home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DKBSRC.ARJ / MACCONF.H < prev    next >
C/C++ Source or Header  |  1991-05-04  |  5KB  |  108 lines

  1. /*****************************************************************************
  2. *
  3. *                                   macconf.h
  4. *
  5. *   from DKBTrace (c) 1990  David Buck
  6. *
  7. *  This file contains macintosh-specific defines, types, etc for Think C.
  8. *
  9. * This software is freely distributable. The source and/or object code may be
  10. * copied or uploaded to communications services so long as this notice remains
  11. * at the top of each file.  If any changes are made to the program, you must
  12. * clearly indicate in the documentation and in the programs startup message
  13. * who it was who made the changes. The documentation should also describe what
  14. * those changes were. This software may not be included in whole or in
  15. * part into any commercial package without the express written consent of the
  16. * author.  It may, however, be included in other public domain or freely
  17. * distributed software so long as the proper credit for the software is given.
  18. *
  19. * This software is provided as is without any guarantees or warranty. Although
  20. * the author has attempted to find and correct any bugs in the software, he
  21. * is not responsible for any damage caused by the use of the software.  The
  22. * author is under no obligation to provide service, corrections, or upgrades
  23. * to this package.
  24. *
  25. * Despite all the legal stuff above, if you do find bugs, I would like to hear
  26. * about them.  Also, if you have any comments or questions, you may contact me
  27. * at the following address:
  28. *
  29. *     David Buck
  30. *     22C Sonnet Cres.
  31. *     Nepean Ontario
  32. *     Canada, K2H 8W7
  33. *
  34. *  I can also be reached on the following bulleton boards:
  35. *
  36. *     ATX              (613) 526-4141
  37. *     OMX              (613) 731-3419
  38. *     Mystic           (613) 731-0088 or (613) 731-6698
  39. *
  40. *  Fidonet:   1:163/109.9
  41. *  Internet:  David_Buck@Carleton.CA
  42. *
  43. *  IBM Port by Aaron A. Collins. Aaron may be reached on the following BBS'es:
  44. *
  45. *     Lattice BBS                      (708) 916-1200
  46. *     The Information Exchange BBS     (708) 945-5575
  47. *     Stillwaters BBS                  (708) 403-2826
  48. *
  49. *****************************************************************************/
  50.  
  51.  
  52. /* The following defines may be added when porting to other systems or
  53.    other compilers.  The defaults are shown here:
  54.  
  55.  
  56.    #define PARAMS(x) x                   - use 'x' for ANSI, '()' for non ANSI
  57.    #define EPSILON 1.0e-5                - a small value used for quartics
  58.    #define FILE_NAME_LENGTH 150          - default file name length
  59.    #define DBL double                    - floating point precision
  60.    #define HUGE_VAL 1.0e+17              - a really big number
  61.    #define DBL_FORMAT_STRING "%lf"       - the string to use for scanfs of doubles
  62.    #define DEFAULT_OUTPUT_FORMAT  'd'    - the default +f format
  63.    #define TEST_ABORT                    - code to test for ^C or abort
  64.                                            (called on each pixel)
  65.    #define RED_RAW_FILE_EXTENSION ".red" - for +fr, this is the extension for the
  66.                                            red file
  67.    #define GREEN_RAW_FILE_EXTENSION ".grn"  - ditto for the green file
  68.    #define BLUE_RAW_FILE_EXTENSION ".blu"   - ditto again for the blue file
  69.    #define STARTUP_DKB_TRACE             - first executable statement of main
  70.                                            (useful for initialization)
  71.    #define PRINT_OTHER_CREDITS           - used for people who extend dkbtrace.
  72.                                            (put your own printf's here)
  73.    #define FINISH_DKB_TRACE              - last statement before exiting normally
  74.    #define FILENAME_SEPARATOR "/"        - the character that separates names
  75.                                            in a path.
  76.    #define setvbuf(w,x,y,z)              - some systems don't understand setvbuf.
  77.                                            If not, just define it away - it's
  78.                                            not critical to the raytracer.  It
  79.                                            just buffers disk accesses.
  80. */
  81.  
  82. #include <stdarg.h>
  83. #include <stdlib.h>
  84. #include <console.h>
  85.  
  86. #define DBL double
  87.  
  88. #define DBL_FORMAT_STRING "%lf"
  89.  
  90. #define MAX_BITMAP_SIZE 65535L    /* 320 x 200 plus a little */
  91.  
  92. /*#define TEST_ABORT if (Options & EXITENABLE) if (kbhit()) { Stop_Flag = TRUE;
  93. #define TEST_ABORT
  94.  
  95. #define ACOS acos
  96. #define SQRT sqrt
  97. #define POW pow
  98. #define COS cos
  99. #define SIN sin
  100. #define EPSILON 1.0e-5
  101.  
  102. /* This gives us ANSI prototyping */
  103. #define PARAMS(x) x
  104. #define volatile
  105.  
  106. char *malloc();
  107. #define START_DKB_TRACE argc = ccommand(&argv);
  108.